import { Space } from 'antd';
import { SpaceProps } from 'antd/es/space';
import React from 'react';

interface IOTitleProps extends SpaceProps {
  text?: 'Input' | 'Output' | string;
}

function IOTitle({ text, ...props }: IOTitleProps) {
  return (
    <Space
      style={{
        fontSize: '1rem',
        fontWeight: 500,
        marginBottom: 12,
        alignItems: 'center',
        display: 'flex',
      }}
      {...props}
    >
      <div>{text}</div>
    </Space>
  );
}

export default React.memo(IOTitle);
